package com.ayoka.parenting.bean;

import com.jincp.common.utils.GsonUtil;

import java.io.Serializable;
import java.util.List;

/**
 * @ProjectName: AyokaClient.
 * @ClassName: MeditationQuestionBean.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/11/14 14:53.
 */

public class MeditationQuestionBean implements Serializable {


    /**
     * ID : 1
     * MeditationID : 1
     * Question : 今天我是在什么时间什么状态下听的冥想：（多选题）
     * _Options : A、早晨起床后|B、上午|C、午休时间|D、下午|E、晚上|F、睡前|G、开车时|H、走路时|I、安静的一个人的空间
     * Options : [{"Index":0,"Option":"A、早晨起床后"},{"Index":1,"Option":"B、上午"},{"Index":2,"Option":"C、午休时间"},{"Index":3,"Option":"D、下午"},{"Index":4,"Option":"E、晚上"},{"Index":5,"Option":"F、睡前"},{"Index":6,"Option":"G、开车时"},{"Index":7,"Option":"H、走路时"},{"Index":8,"Option":"I、安静的一个人的空间"}]
     * QuestionType : 1
     * AnswerResult : [{"QuestionID":1,"QuestionType":0,"Answer":"F、睡前"}]
     */

    public String ID;
    public String MeditationID;
    public String Question;
    public String _Options;
    public int QuestionType;
    public List<OptionsBean> Options;
    public List<AnswerResultBean> AnswerResult;

    public AnswerResultBean Answer;

    public static class OptionsBean implements Serializable {

        public int Index;
        public String Option;

        public boolean isSelected;
    }

    public static class AnswerResultBean implements Serializable {

        public AnswerResultBean(String questionID, int questionType) {
            QuestionID = questionID;
            QuestionType = questionType;
        }

        public String QuestionID;
        public int QuestionType;
        public String Answer;
        public List<Integer> AnswerOption;

        @Override
        public String toString() {
            String json = GsonUtil.getInstance().objectToJson(this, AnswerResultBean.class);
            return json;
        }
    }
}
